package test;

public class code4 {
    public static void main(String[] args){
        int[] arr = {2,5,2,0,3,2,5,1,2,4};
        int[] arr2 = {0,0,0,0,0,0};
        for(int i = 0; i < 10; i++){
            int n = arr[i];
            arr2[n] += 1;
        }
        for(int i = 0; i < 6; i++){
            System.out.println("候选人" + i + "获得了" + arr2[i] + "票");
        }
    }
}